{include file="public/_header.html"}

<body>
<div id="main_body">
{if isStaff() && getParam('site_shutdown')}
<div id="site_offline">
	{language text='Mod_Site.website_is_offline'}
</div>
{/if}
<table id="outer" cellpadding="0" cellspacing="0">
<tr>
<td>
 {* START main menu *}
 <div id="outer2">
 <table style="margin-left:auto;margin-right:auto;" cellpadding="0" cellspacing="0">
 <tr>
 	{Menu::MainMenu location="main" template="MainMenu"}
    {if !empty($plugin_main_links) }
    {section name=I loop=$plugin_main_links}
	<td class="menu" onclick="javascript:window.location.href='{url link="`$plugin_main_links[I].link`"}';" onmouseover="this.className='menu2';" onmouseout="this.className='menu';">
   	 <a href="{url link="`$plugin_main_links[I].link`"}">{$plugin_main_links[I].name}</a>
    </td>
	{/section}
    {/if}
 </tr>
 </table>
 </div>
 {* END main menu *}
 {if $bHideHeader}
 <table id="top" cellpadding="0" cellspacing="0" border="0">
 <tr>
 	<td>
 		<table style="width:100%;" cellpadding="4" cellspacing="4">
 		<tr>
 			<td style="font-size:8pt;vertical-align:middle;">
 				{Messenger::Alert oUser=$oCurrUser}
 			</td>
 			<td style="vertical-align:middle; font-size:7pt; text-align:right;">
 				
 				{if $bAllowLangPack && !$aCurrUser}
 				<form method="post" action="{url link="public"}" style="margin:0px;">
 				<div><input type="hidden" name="return" value="{url link='current'}" /></div>
 				{/if} 				
 			
 				<table style="margin-right:0px; margin-left:auto; text-align:left; font-size:7pt;" cellpadding="1" cellspacing="1">
 				<tr>
 				 	{Menu::MainMenu location="header" template="MainHeader"} 					
 				 	{if !pluginInstalled('chat')}
 					<td> 			
					    <a {if $aCurrUser}href="javascript:void(0);" onclick="popUp2('{url link='public.account.livechat'}', '800','610','yes','100','100', 'chat');"{else}href="{url link=public.login}"{/if}>{language text="live_chat"}</a>
		    		</td>
		    		<td>|</td>
		    		{else}
 					<td> 			
					    <a {if $aCurrUser}href="javascript:void(0);" onclick="popUp2('{$sChatUrl}','800','435','yes','100','100', 'flashchat');"{else}href="{url link=public.login}"{/if}>{language text='Mod_Chat.flashchat'}</a>
		    		</td>
		    		<td>|</td>		    		
		    		{/if}
		    		<td>
						<a {if $aCurrUser}href="javascript:void(0);" onclick="popUp2('{url link='public.account.messenger'}','330','615','yes','200','100', 'messenger');"{else}href="{url link=public.login}"{/if}>{language text='Mod_Chat.instant_messenger'}</a>
					</td>
					<td>|</td>
					<td>
					{if getParam('allow_bookmarking')}
						<a href="javascript:void(0);" style="cursor:pointer;" class="hidClass" onclick="sId('social_bookmarks').style.display='';">{language text='main_bookmark'}</a>
						<div>
							<div id="social_bookmarks" style="position:absolute; padding:5px; display:none;" class="socialBox hidClass">
							<div class="socialDefault" onclick="bookmark('{$sUrl}', '{Site::SiteTitle}'); sId('social_bookmarks').style.display='none';" style="padding:2px; cursor:pointer; width:125px;" onmouseover="this.className='socialOver';" onmouseout="this.className='socialDefault';"><img src="file/pic/bookmarks/favorites.png" alt="" style="vertical-align:middle;" /> {language text='favorites'}</div>
								{bookmarks header='true'}
							</div>
						</div>
					{else}
					<a href="javascript:void(0);" onclick="bookmark('{$sUrl}', '{Site::SiteTitle}');">{language text='bookmark_us'}</a>					
					{/if}
					</td>
				{if $aCurrUser}
					<td>|</td>			
					<td style="vertical-align:middle;">
            			<a href="{url link='public.logout'}">{language text="logout"}</a>
            		</td>
            	{/if}
    	         {if $bAllowLangPack && !$aCurrUser}
    	         	<td>|</td>
	            	<td style="font-size:7pt;">
    	         		{language text="up.language"}:
    	         	</td>
    	         	<td>
             			<select name="guest_language" style="width:100px; vertical-align:middle;" onchange="submit();">
            				{foreach from=$aLanguages item=aLang}
            				{if $aLang.userselect}
							<option value="{$aLang.id}"{if $sGuestLang == $aLang.id} selected="selected"{/if}>{$aLang.title}</option>
							{/if}
							{/foreach}
						</select>
					</td>
            	{/if}				
				</tr>
				</table>
				{if $bAllowLangPack && !$aCurrUser}
				</form>
				{/if}				
 			</td>
 		</tr>
 		</table>
 		<table style="width:100%;" cellpadding="0" cellspacing="0">
 		<tr>
 			<td style="width:30%;font-size:14pt;vertical-align:middle;text-align:center;" class="top2">
 				{if $sLogoFile}<a href="{url link='public'}">{img src="`$sStylePath``$sLogoFile`" alt=""}</a>{/if}
 			</td>
 			<td style="width:70%;vertical-align:middle;text-align:center;" class="top2">
 				&nbsp;{Ads::ShowAds place=1}
 			</td>
 		</tr>
 		</table>
 		<br />
 	</td>
 </tr>
 </table>
 {* START LOGIN BAR *}
 {if $aCurrUser}
    {else}
 {Account::Login url_success='public.account' url_error='public.login' url_forgotpass='public.forgotpass'}
    {/if}
 {* END LOGIN BAR *}
 {else}
<br />
<div style="text-align:center;">
	{Ads::ShowAds place=2}
</div>
<br />
<table class="mainmenu5" style="width:100%;" cellpadding="5" cellspacing="0">
<tr>
    <td style="vertical-align:center;font-size:9pt;text-align:right;">
        <div style="padding:5px;">
        {$sSiteSlogan}
        </div>
    </td>
</tr>
</table>
{/if}
{* START content *}
<table style="width:100%;" cellpadding="0" cellspacing="0">
    <tr>
        <td><div id="msalert"></div></td>
    </tr>
	<tr>
		<td style="vertical-align:top;" id="main">
			{include file=$sTplName}
			<table cellpadding="0" cellspacing="0" border="0" width="100%" style="padding:5px;">
			<tr>
    			<td align="center">
        			{Ads::ShowAds place=2}
    			</td>
			</tr>
			</table>
			{if !empty($plugin_content)}{$plugin_content}{/if}
		</td>
	</tr>
</table>
{* END content *}
{if $bHideHeader}
 <table id="bottom3" cellpadding="5" cellspacing="5">
 <tr>
    <td style="font-size:7pt;">
    <div style="padding:5px;">
        <a href="javascript:void(0);" onclick="popUp2('{url link='public.popup' file='terms' dir='language'}','500','500','yes','200','100');">{language text="terms_amp_conditions"}</a>
        | <a href="javascript:void(0);" onclick="popUp2('{url link='public.popup' file='help' dir='language'}','500','500','yes','200','100');">{language text="help"}</a>
        | <a href="{url link='public.contact-us'}">{language text="contact_us"}</a>
        | <a href="{url link='public.account.invite'}">{language text="invite"}</a>
        | <a href="{url link='public.rss.view'}">{language text="rss.feeds"}</a>
        | <a href="{url link='public.content' file='about_us' dir='language'}">{language text="about_us"}</a>
        | <a href="{url link='public.content' dir='language' file='get_involved'}">{language text="get_involved"}</a>
        {if getParam('sub_system')}| <a href="{url link='public.subscribe'}">{language text="subscribe"}</a>{/if}
        | <a href="{url link='public.archive'}">{language text="archive"}</a>
        <div style="padding-top:4px;">
		{Menu::MainMenu location="bottom" template="MainFooter"}
        {if !empty($plugin_bottom_links) }
        {section name=I loop=$plugin_bottom_links}
        {if $plugin_bottom_links[I].count != 1} | {/if}
        <a href="{url link="`$plugin_bottom_links[I].link`"}">{$plugin_bottom_links[I].name}</a>
        {/section}
        {/if}
		</div>
	</div>
    <br />
    <table id="bottom4" style="width:100%;" cellpadding="4" cellspacing="4">
    <tr>
        <td style="text-align:center;font-size:8pt;">
            Copyright &copy; 2009 {$sSiteName}
        </td>
    </tr>
    </table>
	</td>
</tr>
</table>
{else}
<table class="mainmenu5" style="width:100%;" cellpadding="5" cellspacing="0">
<tr>
    <td style="vertical-align:center;font-size:9pt;">
        <div style="padding:5px;">
            {$sSiteSlogan}
        </div>
    </td>
</tr>
</table>
{/if}
</td>
</tr>
</table>
{if $bRemoveBrand}
<!-- #####################################

POWERED BY PHPFOX

 A phpFoX Limited Company

 You may not remove this copyright as agreed by our Terms & Conditions.

             - www.phpfox.com

 ##################################### //-->
<div style="text-align:center;margin:4px;">
	<div style="padding:8px;font-size:8pt;margin-left:auto;margin-right:auto;width:400px;">
		<a href="http://www.phpfox.com/" target="_blank" style="padding:5px;">{str_replace text="`powered_by_phpfox_version_sphpfoxve`" sPhpFoxVersion="`$sPhpFoxVersion`" }</a>
	</div>
</div>
 <!-- #####################################


     1. phpFoX and all of its source code and files are protected by Copyright Laws.

     2. The license for phpFoX permits you to install this software on a single domain (.com, .org, .net, etc.).

     3. You may also not remove the "Powered By phpFoX" screen which shows the copyright information and credits for phpFoX.



 ##################################### //-->
{/if}
</div>
<div id="ajax_temp_content" style="display:none;"></div>
<div id="popupLayer" style="display:none;"></div>
{if !getParam('debug')}
</body>
</html>{/if}